<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
Class Downfile extends CI_Controller{
    public function __construct() {
        parent::__construct();
        $this->load->helper("url");
        $this->load->helper('download');
        $this->load->helper('form');
        $this->load->model('Download_m');
        $this->load->library('form_validation');
        $this->load->library('session');
        $this->load->library("my_layout");
    }
    public function index()
    {
        $session_download = $this->session->userdata('download_file');
        $test=$session_download['name'];
        $data = file_get_contents("./csv_source/".$test); 
        force_download($test, $data);
    }
}
?>
